<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
		<h:form>
			<p:growl />
			<h:outputText value="Logistics" styleClass="outputTextTitle" />
		
			<h:panelGrid columns="3">
							
				<h:outputLabel value="#{msg['logisticfor.label']}" />
				<h:outputLabel value=" : " />				
				<p:selectOneMenu value="#{logisticsBean.selectedLogisticsFor}" >  
				    <f:selectItem itemLabel="Select a Mode" itemValue="" />
					<f:selectItems value="#{logisticsBean.travelModetMap}"/> 
					<p:ajax event="change" listener="#{logisticsBean.travelModeChangeListener}" update="@form" />
				</p:selectOneMenu>
		     </h:panelGrid>
		     
		     <h:outputLabel
					value="Details for #{logisticsBean.displayName} logistics" styleClass="outputTextSubTitle"
					rendered="#{logisticsBean.detailsForLogistics}" />
		
		 		
		 <h:panelGrid style="width: 100%; text-align: left;" rendered="#{logisticsBean.detailsForLogistics}">
		    								
		 <p:dataTable id="travelLogisticsTable" style="width: 100%"
									value="#{logisticsBean.logisticsList}"
									var="row" editable="true"
									selectionMode="multiple" rowKey="#{row.logisticsId}">
									
									<p:column headerText="#{msg['logisticname.label']}">										
										<!-- <h:outputText value="#{row.logistics}" /> -->
										<p:cellEditor>  
							                <f:facet name="output">  
							                    <h:outputText value="#{row.logistics}" />  
							                </f:facet>  
							                <f:facet name="input">  
							                    <p:inputText value="#{row.logistics}" />  
							                </f:facet>  
							            </p:cellEditor>
									</p:column>
									<p:column headerText="#{msg['displayname.label']}">
										<!--<h:outputText value="#{row.displayName}" /> -->
										<p:cellEditor> 
										    <f:facet name="output">  
							                    <h:outputText value="#{row.displayName}" />  
							                </f:facet>  
							                <f:facet name="input">  
							                    <p:inputText value="#{row.displayName}" />  
							                </f:facet>
							             </p:cellEditor>
									</p:column>
									<p:column headerText="#{msg['dispalyorder.label']}">
										<!-- <h:outputText value="#{row.displayOrder}" /> -->
										<p:cellEditor> 
										    <f:facet name="output">  
							                    <h:outputText value="#{row.displayOrder}" />  
							                </f:facet>  
							                <f:facet name="input">  
							                    <p:inputText value="#{row.displayOrder}" />  
							                </f:facet>
							             </p:cellEditor>
									</p:column>
									<p:column headerText="#{msg['logisticfor.label']}">
										<!-- <h:outputText value="#{row.displayOrder}" /> -->
										<p:cellEditor> 
										    <f:facet name="output">  
							                    <h:outputText value="#{row.displayOrder}" />  
							                </f:facet>  
							                <f:facet name="input">  
							                    <p:inputText value="#{row.displayOrder}" />  
							                </f:facet>
							             </p:cellEditor>
									</p:column>
									<p:column headerText="#{msg['description.label']}">
										<!-- <h:outputText value="#{row.description}" /> -->
										<p:cellEditor> 
										    <f:facet name="output">  
							                    <h:outputText value="#{row.description}" />  
							                </f:facet>  
							                <f:facet name="input">  
							                    <p:inputTextarea value="#{row.description}"/>
							                </f:facet>
							             </p:cellEditor>
									</p:column>
									<p:column headerText="Options" style="width:50px">  
							            <p:rowEditor />  
							        </p:column>  

								</p:dataTable>
				</h:panelGrid>
			
				

		</h:form>
	</ui:define>
</ui:composition>